i% = DoMsgBox("You may select to install the full product or only create the icons if the files are already installed in some directory.", "INET for Windows Help", MB_TASKMODAL+MB_OK)
IF ProductNumber% = INSTALL_ALL THEN
i% = DoMsgBox("If you are using a third party TCP/IP Winsock (e.g. Windows 95), install the Applications only to exclude the INET Winsock.", "INET for Windows Help", MB_TASKMODAL+MB_OK)
i% = DoMsgBox("Applications include all the terminal emulators and printer servers and clients.", "INET for Windows Help", MB_TASKMODAL+MB_OK)
END IF
GOTO WELCOME1
ELSEIF sz$ = "BUTTON_O" THEN 'pressed Overview
i% = DoMsgBox("An overview is available in README.TXT and INETINFO.WRI on the install disk. Install shall make icons for these files.", "INET for Windows Help", MB_TASKMODAL+MB_OK)
IF InstallOption% = INSTALL_ICONS AND DoesFileExist(Drive$+DEST$+"\inetinfo.wri",femExists) = 0 THEN
i% = DoMsgBox("Your selected directory "+Drive$+DEST$+" does not contain installed programs. The flag file, INETINFO.WRI, must be available to continue.", "Inet Setup Warning", MB_OK+MB_TASKMODAL+MB_ICONHAND)
GOSUB ASKQUIT
GOTO GETDRIVE 'dis/allow a stupid continue
END IF
'Actual installation
Install
Make_Icons
GOSUB Configure
GOTO QUIT
ELSEIF sz$ = "REACTIVATE" THEN 'pressed Ctrl-F4?
GOTO GETDRIVE
ELSEIF sz$ = "BUTTON_X" THEN 'pressed eXit
GOSUB ASKQUIT
GOTO GETDRIVE
ELSEIF sz$ = "BUTTON_B" THEN 'pressed Back
UIPop 1
GOTO WELCOME
ELSE 'Esc kom hier uit.
GOSUB ASKQUIT
GOTO GETDRIVE
END IF
QUIT:
ON ERROR GOTO ERRQUIT
'If there was no prev Inet installation, and he wants kernel, tell info about drivers etc.
sz$ = GetEnvVariableValue("INET")
' IF sz$ = "" THEN
IF ProductNumber% = INSTALL_LITE OR ProductNumber% = INSTALL_ALL THEN
IF temp$ <> Drive$+DEST$ THEN ' has wrong "WINET" variable, chk autoexec
IF DoesFileExist("c:\autoexec.bat",femExists) = 1 THEN
temp$ = ""
temp$ = GetIniKeyString ("c:\autoexec.bat", ": The next line was inserted by INET for Windows setup :", "set WINET")
IF temp$ = "" THEN 'There is no "set WINET", make new file to insert before old .bat
RemoveFile "c:\autoexec.ine", cmoNone
RenameFile "c:\autoexec.bat", "autoexec.ine"
CreateIniKeyValue "c:\autoexec.bat", ": The next line was inserted by INET for Windows setup :", "set WINET", Drive$+DEST$, cmoOverwrite
'CreateIniKeyValue "c:\autoexec.bat", ": The next line was inserted by INET for Windows setup :", "set INET", InetDir$, cmoOverwrite
CopyFile "c:\autoexec.ine", "c:\autoexec.bat", cmoNone, 1 'append old copy to new file
i% = DoMsgBox("I have inserted a SET WINET="+Drive$+DEST$+" statement in C:\AUTOEXEC.BAT. The old file is now C:\AUTOEXEC.INE. A reboot is recommended.", "Inet Setup Information", MB_OK+MB_TASKMODAL)
ELSEIF temp$ <> Drive$+DEST$ THEN ' has wrong "set WINET", change it
CreateIniKeyValue "c:\autoexec.bat", ": The next line was inserted by INET for Windows setup :", "set WINET", Drive$+DEST$, cmoOverwrite
'CreateIniKeyValue "c:\autoexec.bat", ": The next line was inserted by INET for Windows setup :", "set INET", InetDir$, cmoOverwrite
i% = DoMsgBox("The SET WINET="+temp$+" statement in C:\AUTOEXEC.BAT has been changed to SET WINET="+Drive$+DEST$+". A reboot is recommended.", "Inet Setup Information", MB_OK+MB_TASKMODAL)
END IF
ELSE
i% = DoMsgBox("A SET WINET="+Drive$+DEST$+" statement is needed to set the environment, but I could not find C:\AUTOEXEC.BAT.", "Inet Setup Warning", MB_OK+MB_TASKMODAL+MB_ICONHAND)